﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

#endregion

namespace MetaHeuristics.Tsp
{
    /// <summary>
    /// A city.
    /// </summary>
    public class City
    {
        private PointF position;
        private string name;

        /// <summary>
        /// Initializes a new instance of city with a name and a position
        /// </summary>
        /// <param name="name">
        /// The city name.
        /// </param>
        /// <param name="position">
        /// The city position
        /// </param>
        public City(string name, PointF position)
        {
            this.name = name;
            this.position = position;
        }

        /// <summary>
        /// Gets or sets the city position
        /// </summary>
        /// <value>
        /// A <see cref="PointF"/> instance representing the position of the city
        /// </value>
        public PointF Position
        {
            get
            {
                return position;
            }
        }

        /// <summary>
        /// Gets or sets the city name
        /// </summary>
        /// <value>
        /// A <see cref="String"/> instance representing the city name.
        /// </value>
        public string Name
        {
            get
            {
                return name;
            }
        }

        public override string ToString()
        {
            return String.Format("{0} ({1})", this.name, this.position);
        }
    }
}
